import { userLogin } from "../api/api";

const actions = {
  async userInfoActions({ commit }, payload) {
    const res = await userLogin(payload); // 请求接口
    commit("setUserInfo", res.data); // 将接口中拿到的数据存储起来
    localStorage.setItem("userInfo", JSON.stringify(res.data));
    return res.data;
  },
};

export default actions;
